
	    //JavaScript代码区域
	      layui.use(['layer', 'form', 'laydate', 'table'], function() {
	      	var layer = layui.layer,
	      		$ = layui.$,
	      		form = layui.form,
	      		laydate = layui.laydate,
	      		table = layui.table;
	    	//监听提交
	    	form.on('submit(formDemo)', function(data) {
	    		table.reload('idTest', {
	    			where: data.field
	    		});
	    		return false;
	    	});
	      	
	      	//执行一个laydate实例
	      	laydate.render({
	      		elem: '#start',
	      		max: 0
	      	});
	      	laydate.render({
	      		elem: '#end',
	      		max: 0
	      	});
	      	
	      	//数据表格实例
	      	table.render({
	      		
	      		id: 'idTest',
	      		elem: '#demo',
	      		url: IP+'/api/teacher_eav/rankingList/allrankingList',
	      		height: 'full-180',
	      		method: 'get',
	      		page: true,
	      		even: true,
	      		cols: [[
	      		        {field: 'tId', hide: true},
						{field: 'cId', hide: true}
	      		       ,{field: 'tNo', title: '教师编号', align:'center'}
	      		      ,{field: 'tName', title: '教师姓名', align:'center'}
	      		      ,{field: 'cName', title: '课程名', align:'center'} 
	      		      ,{field: 'dName', title: '系部', align:'center'}
	      		    , {
	    				width: 200,
	    				title: '操作',
	    				align: 'center',
	    				toolbar: '#barDemo'
	    			}
	      	    ]],
	      	   
	      	    request: {
	      		  pageName: 'page'
	      		  ,limitName: 'pageSize'
	      		},              
	      	    response:{
	      	    	  statusName: 'code'
	      			  ,statusCode: 200
	      			  ,msgName: 'msg'
	      			  ,countName: 'count'
	      			  ,dataName: 'data'
	      	    },
	      	    done:function(res, curr, count){
	      			layer.closeAll('loading');
	      			$('tr:first').css({'background-color': '#4BB2FF', 'color': '#fff','font-size': '80px'});
	      			refreshTableDict();
	      	    }
	      	});
	      //数据表格监听工具条(查看、编辑、删除按钮)
	    	table.on('tool(test)', function(obj) {
	    		var data = obj.data;
	    		var layEvent = obj.event;
	    		if(layEvent === 'scoresDetailed') {
	    			location.href = 'dataDisplays.html?tId=' + data.tId + '&&cId=' + data.cId + '&&tName='+data.tName+'&&tNo='+data.tNo+'';

	    		} 
	    	});

	      	//更新表格字典信息
	      	function refreshTableDict(){
	      		var table_datas=$('#demo').siblings('.layui-form').children('.layui-table-box')
	      			.children('.layui-table-body').children('.layui-table').children('tbody').children('tr');
	      		
	      		

	      	}

	      });